package com.rockcent.mall.lib.repository;

import com.rockcent.common.domain.enumclass.Whether;
import com.rockcent.mall.lib.domain.MerchantBank;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;


/**
 * Created by DK on 16/12/8.
 */
@Repository
public interface MerchantBankRepository extends JpaRepository<MerchantBank, Long>, JpaSpecificationExecutor, MerchantBankRepositoryCustom{

    MerchantBank findByBankNoAndIsDelete(String bankNo, Whether no);

    MerchantBank findByMerchantIdAndMallIdAndIsDelete(Long id, Long id1, Whether no);

    MerchantBank findByMerchantIdAndBankNoAndMallIdAndBankAccountNameAndIsDelete(Long id, String bankNo, Long id1, String bankAccountName, Whether no);

    MerchantBank findByMerchantIdAndMallId(Long id, Long id1);

    MerchantBank findByMerchantIdAndBankNameAndBankNoAndMallIdAndBankAccountNameAndIsDelete(Long anUserInfoDtomerchantId, String bankName, String dtoBankNo, Long mallId, String bankAccountName, Whether no);
}
